package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.HRecordSalaryInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.HRecordSalaryInfo;
import com.crm.jdy.common.mapper.HRecordSalaryInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(薪资档案表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class HRecordSalaryInfoServiceImpl  extends ServiceImpl<HRecordSalaryInfoMapper,HRecordSalaryInfo> implements HRecordSalaryInfoService  {


    @Autowired
    HRecordSalaryInfoMapper hRecordSalaryInfoMapper;


    @Override
    public PageInfo<HRecordSalaryInfo> seleteHRecordSalaryInfo(HRecordSalaryInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<HRecordSalaryInfo> bookList = hRecordSalaryInfoMapper.seleteHRecordSalaryInfo(wOutInfo);
        PageInfo<HRecordSalaryInfo> pageInfo = new PageInfo<HRecordSalaryInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateHRecordSalaryInfo(HRecordSalaryInfo wOutInfo) {
        return hRecordSalaryInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public boolean addHRecordSalaryInfo(HRecordSalaryInfo wOutInfo) {
        return hRecordSalaryInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean removeHRecordSalaryInfo(String recId) {
        return hRecordSalaryInfoMapper.deleteById(recId) > 0;
    }
}